package com.bnlr.lrparking.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * 分期银行实体
 */

public class StagesBankBean {

    /**
     * errorCode : 0
     * msgcode : 1
     * msg : 成功
     * data : [{"BankId":20,"BankName":"邮政储蓄","BankIconUrl":"http://120.27.27.144:8003/upload/bankIcon/PSBC.png","drStages":[{"BankId":20,"NumBers":12,"InterestRate":0.24,"YearOrMonth":1,"IsDefault":0,"BankCode":"PSBC","BankName":"邮政储蓄","PhotoUrl":""},{"BankId":20,"NumBers":24,"InterestRate":0.24,"YearOrMonth":1,"IsDefault":1,"BankCode":"PSBC","BankName":"邮政储蓄","PhotoUrl":""},{"BankId":20,"NumBers":36,"InterestRate":0.25,"YearOrMonth":1,"IsDefault":0,"BankCode":"PSBC","BankName":"邮政储蓄","PhotoUrl":""},{"BankId":20,"NumBers":48,"InterestRate":0.26,"YearOrMonth":1,"IsDefault":0,"BankCode":"PSBC","BankName":"邮政储蓄","PhotoUrl":""}]},{"BankId":18,"BankName":"浦发银行","BankIconUrl":"http://120.27.27.144:8003/upload/bankIcon/SDPB.png","drStages":[{"BankId":18,"NumBers":60,"InterestRate":0.16,"YearOrMonth":1,"IsDefault":1,"BankCode":"SDPB","BankName":"浦发银行","PhotoUrl":""}]}]
     * recordCount : 0
     */

    private int errorCode;
    private String msgcode;
    private String msg;
    private int recordCount;
    private List<DataBean> data;

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public String getMsgcode() {
        return msgcode;
    }

    public void setMsgcode(String msgcode) {
        this.msgcode = msgcode;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getRecordCount() {
        return recordCount;
    }

    public void setRecordCount(int recordCount) {
        this.recordCount = recordCount;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Parcelable {
        /**
         * BankId : 20
         * BankName : 邮政储蓄
         * BankIconUrl : http://120.27.27.144:8003/upload/bankIcon/PSBC.png
         * drStages : [{"BankId":20,"NumBers":12,"InterestRate":0.24,"YearOrMonth":1,"IsDefault":0,"BankCode":"PSBC","BankName":"邮政储蓄","PhotoUrl":""},{"BankId":20,"NumBers":24,"InterestRate":0.24,"YearOrMonth":1,"IsDefault":1,"BankCode":"PSBC","BankName":"邮政储蓄","PhotoUrl":""},{"BankId":20,"NumBers":36,"InterestRate":0.25,"YearOrMonth":1,"IsDefault":0,"BankCode":"PSBC","BankName":"邮政储蓄","PhotoUrl":""},{"BankId":20,"NumBers":48,"InterestRate":0.26,"YearOrMonth":1,"IsDefault":0,"BankCode":"PSBC","BankName":"邮政储蓄","PhotoUrl":""}]
         */

        private int BankId;
        private String BankName;
        private String BankIconUrl;
        private List<DrStagesBean> drStages;

        public int getBankId() {
            return BankId;
        }

        public void setBankId(int BankId) {
            this.BankId = BankId;
        }

        public String getBankName() {
            return BankName;
        }

        public void setBankName(String BankName) {
            this.BankName = BankName;
        }

        public String getBankIconUrl() {
            return BankIconUrl;
        }

        public void setBankIconUrl(String BankIconUrl) {
            this.BankIconUrl = BankIconUrl;
        }

        public List<DrStagesBean> getDrStages() {
            return drStages;
        }


        public void setDrStages(List<DrStagesBean> drStages) {
            this.drStages = drStages;
        }

        public static class DrStagesBean implements Parcelable {
            /**
             * BankId : 20
             * NumBers : 12
             * InterestRate : 0.24
             * YearOrMonth : 1
             * IsDefault : 0
             * BankCode : PSBC
             * BankName : 邮政储蓄
             * PhotoUrl :
             */

            private int BankId;
            private int NumBers;
            private double InterestRate;
            private int YearOrMonth;
            private int IsDefault;
            private String BankCode;
            private String BankName;
            private String PhotoUrl;

            public int getBankId() {
                return BankId;
            }

            public void setBankId(int BankId) {
                this.BankId = BankId;
            }

            public int getNumBers() {
                return NumBers;
            }

            public void setNumBers(int NumBers) {
                this.NumBers = NumBers;
            }

            public double getInterestRate() {
                return InterestRate;
            }

            public void setInterestRate(double InterestRate) {
                this.InterestRate = InterestRate;
            }

            public int getYearOrMonth() {
                return YearOrMonth;
            }

            public void setYearOrMonth(int YearOrMonth) {
                this.YearOrMonth = YearOrMonth;
            }

            public int getIsDefault() {
                return IsDefault;
            }

            public void setIsDefault(int IsDefault) {
                this.IsDefault = IsDefault;
            }

            public String getBankCode() {
                return BankCode;
            }

            public void setBankCode(String BankCode) {
                this.BankCode = BankCode;
            }

            public String getBankName() {
                return BankName;
            }

            public void setBankName(String BankName) {
                this.BankName = BankName;
            }

            public String getPhotoUrl() {
                return PhotoUrl;
            }


            public void setPhotoUrl(String PhotoUrl) {
                this.PhotoUrl = PhotoUrl;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.BankId);
                dest.writeInt(this.NumBers);
                dest.writeDouble(this.InterestRate);
                dest.writeInt(this.YearOrMonth);
                dest.writeInt(this.IsDefault);
                dest.writeString(this.BankCode);
                dest.writeString(this.BankName);
                dest.writeString(this.PhotoUrl);
            }

            public DrStagesBean() {
            }

            protected DrStagesBean(Parcel in) {
                this.BankId = in.readInt();
                this.NumBers = in.readInt();
                this.InterestRate = in.readDouble();
                this.YearOrMonth = in.readInt();
                this.IsDefault = in.readInt();
                this.BankCode = in.readString();
                this.BankName = in.readString();
                this.PhotoUrl = in.readString();
            }

            public static final Creator<DrStagesBean> CREATOR = new Creator<DrStagesBean>() {
                @Override
                public DrStagesBean createFromParcel(Parcel source) {
                    return new DrStagesBean(source);
                }

                @Override
                public DrStagesBean[] newArray(int size) {
                    return new DrStagesBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.BankId);
            dest.writeString(this.BankName);
            dest.writeString(this.BankIconUrl);
            dest.writeList(this.drStages);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.BankId = in.readInt();
            this.BankName = in.readString();
            this.BankIconUrl = in.readString();
            this.drStages = new ArrayList<DrStagesBean>();
            in.readList(this.drStages, DrStagesBean.class.getClassLoader());
        }

        public static final Parcelable.Creator<DataBean> CREATOR = new Parcelable.Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }
}
